package com.gitee.wsl.common.chart.sample.bar.model

import android.graphics.Color
import com.gitee.wsl.api.SelectAbleItem
import com.gitee.wsl.ext.string.empty

/**
 * @ClassName BarData
 * @Description 数据类, 所有柱形图都用这个传数据
 * @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
 *  * MODIFIED    YYYY-MM-DD   REASON
 */

class BarData(
    //值
    var key: String = String.empty(),
    //线上每个点的值
    var dataSet: MutableList<Float> = mutableListOf<Float>(),
    //线上的颜色
    var color: Int = Color.BLACK
):SelectAbleItem {

    override var isSelected: Boolean = false

    //用于为每个柱形定制颜色
    var dataColor = mutableListOf<Int>()

    var barDataItemList= mutableListOf<BarDataItem>()

}

data class BarDataItem(var value:Float, var color: Int)